package com.wyx.suanfa;

/**
 * @author 王艺锡
 * @version 1.0
 */
public class largestValues {
    public static void main(String[] args) {

    }
}

/*
* class Solution {
    public List<Integer> largestValues(TreeNode root) {
        List<Integer> list = new ArrayList<>();
        Queue<TreeNode> que = new LinkedList<>();
        if(root == null){
            return list;
        }

        que.offer(root);
        while(!que.isEmpty()){
            int len = que.size();
            int max = Integer.MIN_VALUE;
            for(int i = 0;i<len;i++){
                TreeNode temp = que.poll();
                max = max > temp.val?max:temp.val;

                if(temp.left != null){
                    que.offer(temp.left);
                }
                if(temp.right != null){
                    que.offer(temp.right);
                }
            }
            list.add(max);
        }
        return list;

    }
}*/
